In this next tutorial, you will add Position, Size, and Shape operators
to the particle system you created in the last tutorial. You'll also explore
the thinkingParticles user interface a bit more and start learning how
to move operators around, show data streams and learn how to determine
what kinds of information a data stream accepts.
In the previous tutorial you created some particles and gave them basic
upward motion. Now you will add Size and Shape
operators (as you did in the Quick Start lessons) as well as a Position
operator so you can place the particles and have them emit from somewhere
other then 0,0,0.
Start 3ds Max and open the file Tutorial3Part1Start.max from your C:\Documents and Settings\All Users\Documents\cebas\Sample Scenes Shared\thinkingParticles\Tutorials folder or continue forward from your previous tutorial output.
Open the thinkingParticles dialog by using the shortcut keys Alt+Shift+P.
Select Master Dynamic in the DynamicSet Tree View, and click Create to make a new DynamicSet. Name this set Pos_Size_Shape.
With this new DynamicSet selected, click the
Groups icon
and
add the Particles group to the DynamicSet by clicking the Particles
button and then left-clicking in the Wire Setup View.
Now that you have the Particle group, you can add Position, Size, and Shape operators to this DynamicSet.
Click the Operators icon
and choose Standard
from the dropdown list. Add Size and Position
operators to the Pos_Size_Shape DynamicSet.

As you can see, both the Size and the Position operators are created with
their Particle inputs yellow. Also note that the entire Pos_Size_Shape
DynamicSet is now Invalid. You'll correct this in the next steps.
Select the Particle input data stream for the Size operator and drag it to the Particle output data stream of the Particles group.
Select the Particle output data stream for the Particles group and drag it to the Particle input data stream of the Position operator.
It is important to note that in the previous steps you made a connection
from an input to an output data stream, then from an output to an input
data stream. thinkingParticles is not particular when it comes to how
you connect up the various operators within the Wire Setup View.

Select the Position operator and set the Z value to 50 to move the particles up on the Z-axis.
Play the animation to see the results
You can see that the particles have moved up 50 units, but the motion
is not correct. This is because the position is now overwriting the motion.
The Position operator is telling thinkingParticles to set the particles’
position to 0,0,50 always. This means that if the particles try to move,
they get set right back to this position.
How do we know this is the case? By examining the DynamicSet Tree View.

Remember that the rules and operators are processed in order from top to
bottom inside of each DynamicSet. Since the Position operator is at the
bottom of the list inside of the Pos_Size_Shape DynamicSet (as shown above),
it gets processed last, and as a result, overrides the motion data created
above it in the Motion DynamicSet.
There are a few ways to correct this behavior.
This first and simplest way is to set the position of the particles when they are generated. This way the Position only gets set once and the motion will work properly.
The second way is to add a Particle Age condition to the ON input data stream of the Position operator to tell it only to set the position at a particle's birth. Let’s try the second way so you can learn a bit about Conditions in thinkingParticles.
Click the Conditions icon
and add a Particle
Age Condition to the Pos_Size_Shape DynamicSet.
Connect the Particle input data stream of the Particle Age Condition to the Particle output data stream of the Particles group.
By connecting the Particles group to the Particle Age Condition, you've
now instructed the Particle Age Condition to evaluate the particles' ages
in the Particles group. When this new condition now looks at a particle's
age, it will determine if the particle has reached a certain specified
age (set in the operator itself). If it is, it will result in a True
condition being generated by the Particle Age node. If a particle is not
the age specified by the Particle Age node, a False condition
will be generated. These outputs are called Boolean results,
and they can act as on/off switches for other operators to be triggered
by.
However, we don't yet know what to do with that information and how to
tie it into the existing system. There doesn't appear to be another input
data stream on the Position operator. But actually, there are several
more. They are just hidden. You now need to unhide one of them.
Select the Position operator and guide your cursor over the light blue box in the upper left corner of the operator. It will display a tooltip that says Inputs.

Next, right-click on the Inputs box which will reveal a complete list of input data streams for the Position operator.

All visible input data streams will be shown with a check mark next to
their names, while invisible ones will have none.
The arrow next to an input data stream indicates that it is connected to another operator - in this case, the Particle input is connected
When done, you'll now see an additional input data stream for the Position
operator.

Now, the ON input data stream basically tells an operator when to be active
or "on", and it can be driven by other rules and conditions
like the Particle Age Condition. But what kind of inputs does ON take?
A good way to find out it to hover your cursor over the input data stream.
Without clicking, move your cursor over the ON input data stream for the Position operator.

You'll see (as shown above) that it says ON, then in parentheses (Bool).
This is a Boolean input data stream type, and will take
other boolean outputs, like the one generated by a Particle Age Condition.
In this case, the Particle Age condition will turn the Position operator
on or off depending on the age of the particle. Let's connect it and see
what happens.
Connect the Particle Age Out output data stream to the ON input data stream for the Position operator, then play back the animation.

Now that the Position is only assigned at birth (as you can check by
selecting the Particle Age Condition and viewing it's rollout parameters),
the particles behave the way you want them to. Let’s try another way of
getting this same result.
Select the Particle Age condition in the Pos_Size_Shape rollout, and then right-click on its title bar in the center. Choose Remove from the pop-up list.

Removing the Particle Age Condition
Select the Position operator in the Pos_Size_Shape rollout and right-click in a blank area. Choose Cut from the menu.

Select Generate in the Master Dynamic list, then right-click in a blank area of the Generate rollout and choose Paste.
Connect the Particle input data stream of the Position operator to the *Born Particle output data stream of the Born operator.

You can see that this give you the same result as using the Particle Age condition because it only assigns the position upon the particles’ creation.
Select the Pos_Size_Shape DynamicSet and click
the Operators icon
.
Select Shape from the dropdown list.
Add a StdShape operator and connect it to the Particles group.
Set the Standard Shape operator to a Cube.
Select the Size operator and adjust the Size to 2 and Variation % to 50.
Scrub the frame slider to frame 100 and render the Perspective viewport.

Save your file as Tutorial04Part2.max.